﻿// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) 2007 Microsoft Corporation. All rights reserved.

using TShooter.TfsWord.TeamFoundation;

namespace TShooter.TfsWord.AddIn
{
    /// <summary>
    /// We're using Partial class to add a UIManager property to the Globals class.
    /// </summary>
    internal sealed partial class Globals
    {
        private static UIManager.Word.UIManager _uiManager;

        /// <summary>
        /// Gets a default instance of the UIManager class.
        /// </summary>
        internal static UIManager.Word.UIManager UIManager
        {
            get
            {
                if (_uiManager == null)
                {
                    _uiManager = new UIManager.Word.UIManager(ThisAddIn.CustomTaskPanes, ThisAddIn.Application);
                }
                return _uiManager;
            }
        }

        internal static Document CurrentDocument { get; set; }
    }
}